// 类和接口

interface Eat {
    // 函数签名的方式
    eat(food: string): void
}
interface Run {
    run(distance: number): void
}
// implements实现接口
// 类要实现接口必须要有接口中的成员
// 约束类之间公共的能力
class Person implements Eat, Run {
    eat(food: string): void {
        console.log(`优雅的吃,${food}`);
    }
    run(distance: number): void {
        console.log(`直立行走,${distance}`);
    }
}

class Animal implements Eat, Run {
    eat(food: string): void {
        console.log(`呼噜呼噜的吃,${food}`);
    }
    run(distance: number): void {
        console.log(`爬行,${distance}`);
    }
}


export { }